//game.js

Page({
  data: {
    name:"hello world a games",
    swiperCurrent: 0,
    autoplay: true,
    interval: 3000,
    duration: 800,
    circular: true,
    imgUrls: [
      '../../images/24213.jpg',
      '../../images/icons/44.png'
    ],
    links: [
      '../calc/calc',
      '../calc/calc'
    ],
    tabShow: 0, //默认显示第一个
    pullShow:0
  },
  imageLoad:function(e){
    console.log('我执行了')
  },
  //轮播图的切换事件
  swiperChange: function (e) {
    this.setData({
      swiperCurrent: e.detail.current
    })
  },
  //点击指示点切换
  chuangEvent: function (e) {
    this.setData({
      swiperCurrent: e.currentTarget.id
    })
  },
  //点击图片触发事件
  swipclick: function (e) {
    console.log(this.data.swiperCurrent);
    wx.switchTab({
      url: this.data.links[this.data.swiperCurrent]
    })
  },
  tabNav:function(e){
    this.setData({
      tabShow: e.target.id
    })
  },

  pullNav:function(e){
    this.setData({
      pullShow: this.data.pullShow ? 0 : 1
    })
  }
})
